<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    手机号： <input type="number"> <button onclick="seti()">发送</button><span></span>
</body>
</html>
<script>
    var span=document.querySelector('span')
    var but=document.querySelector('button')
    var num=5;
    function seti(){
        but.disabled=true
        setInterval(function(){
            if(num>0){
                num--;
                but.innerHTML=num;
            }else{
                clearInterval(num)
                but.disabled=false;
                but.innerHTML='发送';
            }
        },1000)
    }
</script>